package com.zzw.redisson;


import java.time.LocalDateTime;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;

/**
 * @author Administrator
 */
public interface RedisH {

    class RedisData {
        private Object value;
        private LocalDateTime expire;

        public Object getValue() {
            return value;
        }

        public void setValue(Object value) {
            this.value = value;
        }

        public LocalDateTime getExpire() {
            return expire;
        }

        public void setExpire(LocalDateTime expire) {
            this.expire = expire;
        }
    }

    <T, R> R queryWithLogicalExpire(String keyPrefix, T id, Function<T, R> getById, Class<R> type, long time, TimeUnit timeUnit) throws InterruptedException;
}
